<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	template="/resources/templates/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="page" value="#{accAccountPeriodBean.page}"/>
		<f:event type="preRenderView" listener="#{accAccountPeriodBean.paginate}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Search Acc Account Period entities"/>

	<ui:define name="header">
		Acc Account Period
	</ui:define>

	<ui:define name="subheader">
		Search Acc Account Period entities
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="search">
			<f:validateBean disabled="true">
				<h:panelGroup styleClass="search">

					<h:panelGrid columnClasses="label,component,required" columns="3">
						<h:outputLabel for="accAccountPeriodBeanExampleAccPeriodName" value="Acc Period Name:"/>
						<h:panelGroup>
							<h:inputText id="accAccountPeriodBeanExampleAccPeriodName" maxLength="50" value="#{accAccountPeriodBean.example.accPeriodName}"/>
							<h:message for="accAccountPeriodBeanExampleAccPeriodName" styleClass="error"/>
						</h:panelGroup>
						<h:outputText/>
						<h:outputLabel for="accAccountPeriodBeanExampleAccPeriodYear" value="Acc Period Year:"/>
						<h:panelGroup>
							<h:inputText id="accAccountPeriodBeanExampleAccPeriodYear" value="#{accAccountPeriodBean.example.accPeriodYear}"/>
							<h:message for="accAccountPeriodBeanExampleAccPeriodYear" styleClass="error"/>
						</h:panelGroup>
						<h:outputText/>
						<h:outputLabel for="accAccountPeriodBeanExampleAccPeriodIsActive" value="Acc Period Is Active:"/>
						<h:panelGroup>
							<h:inputText id="accAccountPeriodBeanExampleAccPeriodIsActive" value="#{accAccountPeriodBean.example.accPeriodIsActive}"/>
							<h:message for="accAccountPeriodBeanExampleAccPeriodIsActive" styleClass="error"/>
						</h:panelGroup>
						<h:outputText/>
					</h:panelGrid>
					<h:panelGroup styleClass="buttons">
						<h:commandLink value="Search" action="#{accAccountPeriodBean.search}" styleClass="btn btn-primary"/>
						<h:commandLink value="Create New" action="#{accAccountPeriodBean.create}" styleClass="btn btn-primary"/>
					</h:panelGroup>
				</h:panelGroup>
			</f:validateBean>
			
			<h:dataTable id="accAccountPeriodBeanPageItems" styleClass="data-table" value="#{accAccountPeriodBean.pageItems}" var="_item">
				<h:column>
					<f:facet name="header">
						<h:outputText value="Acc Period Name"/>
					</f:facet>
					<h:link outcome="/form/accAccountPeriod/view">
						<f:param name="id" value="#{_item.accPeriodNo}"/>
						<h:outputText id="itemAccPeriodName" value="#{_item.accPeriodName}"/>
					</h:link>
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="Acc Period Year"/>
					</f:facet>
					<h:link outcome="/form/accAccountPeriod/view">
						<f:param name="id" value="#{_item.accPeriodNo}"/>
						<h:outputText id="itemAccPeriodYear" value="#{_item.accPeriodYear}"/>
					</h:link>
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="Acc Period Begin Date"/>
					</f:facet>
					<h:link outcome="/form/accAccountPeriod/view">
						<f:param name="id" value="#{_item.accPeriodNo}"/>
						<h:outputText id="itemAccPeriodBeginDate" value="#{_item.accPeriodBeginDate}">
							<f:convertDateTime type="date"/>
						</h:outputText>
					</h:link>
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="Acc Period End Date"/>
					</f:facet>
					<h:link outcome="/form/accAccountPeriod/view">
						<f:param name="id" value="#{_item.accPeriodNo}"/>
						<h:outputText id="itemAccPeriodEndDate" value="#{_item.accPeriodEndDate}">
							<f:convertDateTime type="date"/>
						</h:outputText>
					</h:link>
				</h:column>
				<h:column>
					<f:facet name="header">
						<h:outputText value="Acc Period Is Active"/>
					</f:facet>
					<h:link outcome="/form/accAccountPeriod/view">
						<f:param name="id" value="#{_item.accPeriodNo}"/>
						<h:outputText id="itemAccPeriodIsActive" value="#{_item.accPeriodIsActive}"/>
					</h:link>
				</h:column>
			</h:dataTable>
			<ui:include src="/resources/scaffold/paginator.xhtml">
				<ui:param name="paginatorBean" value="#{accAccountPeriodBean}"/>
			</ui:include>
		</h:form>
			
	</ui:define>

</ui:composition>
